-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getFile and getStream mirror putFile and putStream #123
Conversation
Oh, goodness. The first bullet point isn't quite what I had in mind (although it is intriguing). The problem is Knox uses the "File" suffix in two different ways: one, in I agree this is confusing, and am not sure what the right approach is. I don't think it's to try to move toward the "filesystem" meaning though; that's the minority right now. Maybe I thought more that |
Yeah I'm totally willing to compromise on the naming conventions or whatever. But my main issue is with the lack of high level |
I mean part of the issue is keeping Knox lean and mean. Node has abstractions for file IO; if we can get you the stream, that should be enough for you to |
That philosophy is contradicted by having the high level |
|
That is understandable. So, is a high-level |
I don't think so, but as always the @LearnBoost folks are welcome to chime in. If we can solve #114, this should becomes as simple as knoxClient.getFile(remoteFilename, function (err, res) {
if (err) { throw err; }
res.pipe(fs.createWriteStream(destFilename));
}); The key here being that we don't favor (And yes, we do favor |
That code is pretty good. That plus |
see #122.
goals:
getFile
interface just likeputFile
.getFile
emits progressthis is completely untested - looking for preliminary feedback before I figure that stuff out.